/* Mobile footer - Stack vertically with specific layout */
@media (max-width: 767px) {
  /* Make footer stack vertically */
  footer .row {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    overflow-x: visible !important;
    overflow-y: hidden !important;
    margin: 0 !important;
    gap: 0 !important;
    width: 100% !important;
  }
  
  /* Logo column - display at top */
  footer .col-xs-12:first-child,
  footer .col-md-offset-1:first-child {
    order: 1 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 25px 0 20px 0 !important;
    text-align: center !important;
    margin-left: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
  
  /* Logo sizing */
  footer img,
  footer svg,
  footer .logo {
    max-width: 280px !important;
    width: auto !important;
    height: auto !important;
    max-height: 100px !important;
    margin: 0 auto !important;
    display: block !important;
  }
  
  /* Column 2 - LEARN MORE */
  footer .col-xs-12:nth-child(2):not(:last-child),
  footer .col-md-2:nth-child(2):not(:last-child) {
    order: 2 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 25px 20px !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
  
  /* Column 3 - ABOUT */
  footer .col-xs-12:nth-child(3):not(:last-child),
  footer .col-md-2:nth-child(3):not(:last-child) {
    order: 3 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 25px 20px !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
  
  /* Column 4 - PRODUCTS */
  footer .col-xs-12:nth-child(4):not(:last-child),
  footer .col-md-2:nth-child(4):not(:last-child) {
    order: 4 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 25px 20px !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
  
  /* Column 5 - CONTACT US (if not the copyright column) */
  footer .col-xs-12:nth-child(5):not(:last-child),
  footer .col-md-2:nth-child(5):not(:last-child) {
    order: 5 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 25px 20px !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
  
  /* All regular columns default */
  footer .col-xs-12:not(:first-child):not(:last-child),
  footer .col-md-2:not(:first-child):not(:last-child),
  footer .col-sm-2:not(:first-child):not(:last-child) {
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 25px 20px !important;
    text-align: center !important;
    float: none !important;
  }
  
  /* LAST column - this should be the copyright - force to bottom */
  footer .col-xs-12:last-child,
  footer .col-md-2:last-child,
  footer .col-sm-2:last-child {
    order: 999 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 20px 15px !important;
    text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-bottom: none !important;
    margin-top: auto !important;
  }
  
  /* Section headers - reduced spacing */
  footer h3,
  footer h4 {
    font-size: 18px !important;
    white-space: normal !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    line-height: 1.3 !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-align: center !important;
  }
  
  /* Subsection links - tighter spacing */
  footer a,
  footer li {
    font-size: 15px !important;
    line-height: 1.8 !important;
    white-space: normal !important;
    display: block !important;
    text-align: center !important;
    border: none !important;
    padding: 5px 0 !important;
    margin: 0 !important;
  }
  
  footer ul {
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    margin-top: 5px !important;
    list-style: none !important;
  }
  
  footer li {
    margin-bottom: 0 !important;
    border: none !important;
  }
  
  /* Paragraph text */
  footer p {
    font-size: 15px !important;
    line-height: 1.8 !important;
    text-align: center !important;
    border: none !important;
    margin: 0 !important;
    padding: 5px 0 !important;
  }
  
  /* Copyright text specifically (in last column) */
  footer .col-xs-12:last-child p,
  footer .col-md-2:last-child p,
  footer .col-sm-2:last-child p {
    font-size: 13px !important;
    padding: 0 !important;
  }
  
  /* Container */
  footer .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Footer wrapper */
  footer .footer-bottom {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
}

/* For very small phones */
@media (max-width: 375px) {
  footer img,
  footer svg,
  footer .logo {
    max-width: 240px !important;
    max-height: 85px !important;
  }
  
  footer h3,
  footer h4 {
    font-size: 16px !important;
    margin-bottom: 6px !important;
  }
  
  footer a,
  footer li,
  footer p {
    font-size: 14px !important;
    padding: 4px 0 !important;
  }
  
  footer .col-xs-12:last-child p,
  footer .col-md-2:last-child p {
    font-size: 12px !important;
  }
}